<template>
  <nav class="top-nav">
    <div class="logo">
      <img src="/#" alt="Logo" />
    </div>
    <div class="nav-links">
      <a href="#" v-for="(link, index) in links" :key="index">{{ link.name }}</a>
    </div>
  </nav>
</template>

<script setup lang="ts">
import { ref } from 'vue'


const links = ref([
  { name: '链接1', url: '#' },
  { name: '链接2', url: '#' },
  { name: '链接3', url: '#' },
]);
</script>

<style scoped>
.top-nav {
  position: sticky;
  top: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.nav-links a:hover {
  color: #007bff;
}
</style> 